package com.example.evaluate.util;

import com.example.evaluate.model.Question;

public class CalculateUtil {

    /**
     * 计算老师总分
     *
     * */
    public static int getTotalPoint(Question question){
        int temp = question.getQuestion1()
                +question.getQuestion2()
                +question.getQuestion3()
                +question.getQuestion4()
                +question.getQuestion5()
                +question.getQuestion6()
                +question.getQuestion7()
                +question.getQuestion8()
                +question.getQuestion9()
                +question.getQuestion10();

        return 100-temp*2;
    }


    /**
     * 更改问题的表现形式
     * */
    public static String getQuestionString(int m){
        String res = "";
        switch (m){
            case 0:
                res =  "优秀";
                break;
            case 1:
                res =   "良好";
                break;
            case 2:
                res =   "中等";
                break;
            case 3:
                res =   "及格";
                break;
            case 4:
                res =   "不及格";
                break;
        }
        return res;
    }
}
